@import url('@/common/variable.css');
@import url('@/assets/iconfont/iconfont.css');
@import url('@/common/animation.scss');
@import url('@/common/other.scss');
@import url('@/common/order.scss');

.ps {
  $machine-red: #c23d3d;
  $machine-green: #00b050;
  $machine-blue: #4472c4;

  &_tool {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--cbs-primary-color);
    padding: 5px;
    color: var(--cbs-color-fff);
    margin: 0 !important;
  }

  &_tool_sub {
    padding: 0 2px;
  }

  &_subtool {
    background-color: var(--cbs-primary-color);
    padding: 5px;
    color: var(--cbs-color-fff);
    margin: 0 !important;
  }

  // 使用 ps_table 格式化表头的颜色
  &_table_header {
    .el-table__header {
      .el-table__cell {
        background-color: var(--cbs-primary-color) !important;
        color: var(--cbs-color-fff);
        font-weight: normal;
      }
    }
  }

  &_required > .el-form-item__label {
    color: var(--el-color-primary);
  }

  // 看板上面的按钮，选中后的样式
  &_btn_active {
    background-color: orange !important;
    color: #fff !important;
    border-color: orange !important;
  }

  // 界面的基础容器
  &_container {
    width: 100%;
    min-height: 100%;
    background-color: #fff;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;

    &:has(.ps_table) {
      height: 100%;
      min-height: 600px;
      background-color: unset;
    }
  }

  &_table {
    flex: 1;
  }

  // 分页标签的样式
  &_pagination {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 5px 0;
    text-align: center;
  }

  &_board {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-size: 100%;
    background-repeat: repeat;
    background-image: url('../assets/image/visualization-bg.png');

    .board-title {
      color: #fff;
      font-size: 16px;
    }
  }

  // 文字一行显示 溢出显示省略号
  &_text_ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  // 文字滚动类
  &_text_mode_x {
    overflow: hidden;
    span {
      white-space: nowrap;
      display: inline-block;
      animation: 8s roll-x linear infinite normal;
    }
  }

  // 弹窗的样式
  &_dialog {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0px !important;
  }

  &_machine {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-gap: 10px;
  }

  &_machine_5_2 {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }

  // 机台的样式
  &_machine_item {
    height: 120px;
    border-radius: 10px;
    text-align: center;
    padding: 5px;
    font-size: 16px;
    letter-spacing: 0px;
    color: #fff;
    &.blue {
      background-color: $machine-blue;
    }

    &.red {
      background-color: $machine-red;
    }

    &.green {
      background-color: $machine-green;
    }
    .jtbh {
      font-size: 24px;
    }
  }

  // 100%宽高
  &_w_h_100 {
    width: 100%;
    height: 100%;
  }

  &_h_50 {
    height: 50%;
  }

  &_h_100 {
    height: 100%;
  }

  &_m_b_10 {
    margin-bottom: 10px;
  }

  // 10内边距
  &_pd_10 {
    padding: 0 10px;
  }

  &_pd10 {
    padding: 10px;
  }

  &_pd_l_10 {
    padding-left: 10px;
  }

  &_pd_b_10 {
    padding-bottom: 10px;
  }

  // 10左外边距
  &_ml_10 {
    margin-left: 10px;
  }

  // 100%宽度
  &_w100 {
    width: 100% !important;
  }

  // 页面内容
  &_content {
    box-sizing: border-box;
    padding: 10px 5px 0;
  }

  // 左右10内边距
  &_lr_10 {
    padding: 0 10px;
  }

  // 页面flex布局
  &_page {
    display: flex;
    flex-direction: row;
  }

  &_page_left {
    width: 25%;
    padding: 20px;
    border-right: 1px solid var(--el-border-color);
  }

  &_page_right {
    width: 75%;
  }
}
